package com.songshuai.webapi.permission.aop;

import com.songshuai.webapi.common.aop.BaseLogAspect;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;


/**
 * Created by yubo on 2018/12/18
 */
@Aspect
@Component
public class LogAspect extends BaseLogAspect {
  private static Log logger = LogFactory.getLog(LogAspect.class);


  @Pointcut("execution(public * com.songshuai.webapi.permission.controller.*.*(..))")
  public void webLog() {
    //切面
  }

  @Around("webLog()")
  public Object arround(ProceedingJoinPoint pjp) throws Throwable {
    return getLogAspectForm(pjp,logger);


  }


}
